home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
5_8.lha
/
5_8
/
5_8tst.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
714b
|
33 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
include <stream.h>
include "5_8a5.h" // class randint
include "5_8b1.h" // class urand, erand
include "5_8b2.c" // urand::draw()
include "5_8b3.c" // erand::draw()
ain()
randint r(1);
for (int i = 0; i++ < 20; )
cout << "draw(): " << r.draw() << "\n";
r.seed(1);
for (i = 0; i++ < 20; )
cout << "fdraw(): " << r.fdraw() << "\n";
urand ur(15, 65);
ur.seed(1);
for (i = 0; i++ < 20; )
cout << "ur.draw(): " << ur.draw() << "\n";
erand er(50);
er.seed(1);
for (i = 0; i++ < 20; )
cout << "er.draw(): " << ur.draw() << "\n";
return 0;